<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Schools Management System</title>
<meta http-equiv="Content-Language" content="English" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="../style.css" media="screen" />

</head>
<body>
<?php

require_once '../Login/databaseconnection.php';

	if(isset($_POST['Register']))
{
	
$First_Name=$_POST['First_Name'];
   $Last_Name=$_POST['Last_Name'];
 $NIC_Number=$_POST['NIC_Number'];
    $E_Mail=$_POST['E_Mail'];
    $Login_Username=$_POST['Login_Username'];
    $Password=$_POST['Password'];
 


   require_once 'REG.php';
}

?>
	
<div id="wrap">

<div id="header">
<table width="1237" height="119" border="0">
  <tr>
    <td width="880" height="119" rowspan="2"><h1 class="heaaderte"><font color="#996699" style="text-shadow:#969" size="+6">Schools Management System</font></h1></td>
    <td width="266" rowspan="2">&nbsp;</td>
    <td width="77" height="78">&nbsp;</td>
  </tr>
  <tr>
    <td height="35"><a href="../Logout.php" class="logout">Logout</a></td>
  </tr>
</table>
</div>

<div id="menu1_bg">
		<div id="menu1">
			
	
			<ul>
				<li><a href="../index.php" class="active"><font color="#CCCC66" style="text-shadow:#969" size="+1">Home</font></a></li>
				<li><a href="../Schools/Schools.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Schools</font></a></li>
				<li><a href="../teachers/teachers.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Teachers</font></a></li>
				<li><a href="../Lab/Labs.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Labs</font></a></li>
				<li><a href="../Resources/Resources.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Resources</font></a></li>
                <li><a href="#"><font color="#CCCC66" style="text-shadow:#969" size="+1">Resource Team</font></a></li>
                         <li><a href="../Programmes/Programmes.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Programmes</font></a></li>
                                  <li><a href="Competition.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Competitions</font></a></li>
                 <li></li>
			</ul>
	</div>
  </div>
<div class="left">
  
<div class="articles">
  
  <form action="#" method="POST">
  <table width="900" height="274" border="0">
    <tr>
      <th height="25" colspan="3"  scope="row"><?php
		if(isset($_POST['Register']))
{
	if($_SESSION['errorin']!=" ")
	{
		echo $_SESSION['errorin'];
		unset($_SESSION['errorin']);
	}
	if($_SESSION['error']!=" ")
	{
		echo $_SESSION['error'];
		unset($_SESSION['error']);
		
	}
	if($_SESSION['errorvari']!=" ")
	{
		echo $_SESSION['errorvari'];
		unset($_SESSION['errorvari']);
		
	}
	
}
		?></th>
      <td width="217" rowspan="11">&nbsp;</td>
    </tr>
    <tr>
      <th width="187" height="36"  scope="row"><p>&nbsp;</p>
        
        
        First Name:</th>
      <td width="180">
      <?php
	  if(isset($_POST['Register']))
	  {
	   $F_N=$_SESSION['First_Name'];
	   if(isset($_SESSION['First_Name']))
	  
{
     echo "<input type='text' name='First_Name' value='$F_N' />";
}
else
{
	echo "<input type='text' name='First_Name'/>";
}
	  }
	  else
{
	echo "<input type='text' name='First_Name'/>";
}
      ?>
      </td>
      <td width="292">&nbsp;</td>
      </tr>
    <tr>
      <th height="24" scope="row">Last Name:</th>
      <td>
      <?php
	   if(isset($_POST['Register']))
	  {
	 $L_N=$_SESSION['Last_Name'];
	  if(isset($_SESSION['Last_Name']))
	  
{
      echo "<input type='text' name='Last_Name' value='$L_N' />";
}
else
	  
{
      echo "<input type='text' name='Last_Name' />";
}
	  }
	  else
	  
{
      echo "<input type='text' name='Last_Name' />";
}
	  ?></td>
      <td>&nbsp;</td>
      </tr>
    <tr>
      <th height="33" scope="row">NIC Number :</th>
      <td>
       <?php
	   if(isset($_POST['Register']))
	  {
	 $NIC=$_SESSION['NIC_Number'];
	  if(isset($_SESSION['NIC_Number']))
	  
{
      echo "<input type='text' name='NIC_Number' value='$NIC' />";
}
else
	  
{
      echo "<input type='text' name='NIC_Number' />";
}
	  }
	  else
	  
{
      echo "<input type='text' name='NIC_Number' />";
}
	  ?></td>
      <td>&nbsp;</td>
      </tr>
    <tr>
      <th height="29" scope="row">E-Mail: </th>
      <td>   <?php
	   if(isset($_POST['Register']))
	  {
	 $E_M=$_SESSION['E_Mail'];
	  if(isset($_SESSION['E_Mail']))
	  
{
      echo "<input type='text' name='E_Mail' value='$E_M' />";
}
else
	  
{
      echo "<input type='text' name='E_Mail' />";
}
	  }
	  else
	  
{
      echo "<input type='text' name='E_Mail' />";
}
	  ?></td>
      <td>&nbsp;</td>
      </tr>
    <tr>
      <th height="24" scope="row">Username:</th>
      <td> <?php
	   if(isset($_POST['Register']))
	  {
	 $L_U=$_SESSION['Login_Username'];
	  if(isset($_SESSION['Login_Username']))
	  
{
      echo "<input type='text' name='Login_Username' value='$L_U' />";
}
else
	  
{
      echo "<input type='text' name='Login_Username' />";
}
	  }
	  else
	  
{
      echo "<input type='text' name='Login_Username' />";
}
	  ?></td>
      <td>&nbsp;</td>
      </tr>
    <tr>
      <th height="35" scope="row">Password: </th>
      <td><input type="password" name="Password" /></td>
      <td>&nbsp;</td>
      </tr>
    <tr>
      <th height="24" scope="row">Varify your Password: </th>
      <td><input type="password" name="PasswordVar" /></td>
      <td rowspan="2"> 
	  <?php
	  if(isset($_POST['Register']))
{
      if($_SESSION['errorvarfai']!=" ")
	{
		echo $_SESSION['errorvarfai'];
		unset($_SESSION['errorvarfai']);
		
	}
}
	?></td>
     
	<td width="2"></td>
    </tr>
    <tr>
      <th height="24" scope="row">&nbsp;</th>
      <td><?php
 require_once('recaptchalib.php');
          $publickey = "6LexKM0SAAAAANX63JL52sFRoIEUbfXZwKFeAGXX"; // you got this from the signup page
          echo recaptcha_get_html($publickey);
?></td>
      </tr>
   
  </table>
  <br/>
   <a href="CreateNew.php">Reset</a>|
  <input name="Register" align="middle" type="submit" value="Register" />
 </form>
</div>
</div>

<div class="rightmenu"> 
<h1>&nbsp;</h1><br />
<table width="220" border="0">
  <tr>
    <td width="210" height="41">&nbsp;</td>
   

  </tr>
  <tr>
    <td height="41">&nbsp;</td>
    
    
  </tr>
  <tr>
    <td height="41">&nbsp;</td>

    
  </tr>
  <tr>
    <td height="41">&nbsp;</td>
 
    
  </tr>
  <tr>
    <td height="41">&nbsp;</td>
    
    
  </tr>
  <tr>
    <td height="41">&nbsp;</td>
   

  </tr>
</table></div>
 
 <div style="clear: both;"> </div>


<div id="footer"><table width="1236" height="38" border="0">
    <tr>
      <td width="904" height="34">Schools Managemrnt System &copy; 2012 </td>
      <td width="50"><strong><a href="#" class="active">Home</a><a href="#"></a></strong>|</td>
      <td width="80"><strong><a href="#" class="active">Contact Us</a></strong>|</td>
      <td width="40"><a href="http//www.facebook.com"><img src="../images/facebook1.png" width="38" height="38"/></a></td>
      <td width="38"><a href="http//twitter.com"><img src="../Images/twitter.png" width="38" height="38"/></a></td>
      <td width="36"><a href="http//www.google.lk"><img src="../Images/google.png" width="38" height="38"/></a><a href=""http="http"//www.yahoo.com""></a></td>
      <td width="58"><a href=""http="http"//www.yahoo.com""><img src="../Images/yahoo.png" alt="" width="38" height="38"/></a></td>
    </tr>
  </table>
</div>
</div>


</body>
</html>